using imitateMacQQ.WebApi.Domain.Login.register.Login.Interface;
using imitateMacQQ.WebApi.Domain.Request.utils;
using Microsoft.AspNetCore.Mvc;

namespace imitateMacQQ.WebApi.Api.Signin;

[ApiController]
[Route("api/[controller]/[action]")]
public class SinginController : ControllerBase
{
    private readonly IGetLoginCode _getLogin;

    public SinginController(IGetLoginCode getLogin)
    {
        _getLogin = getLogin;
    }

    [HttpGet]
    public async Task<Request<bool>> GetCode(string phone)
    {
        return await _getLogin.GetPhoneCode(phone);
    }
}